package com.example.test.controller;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

import static org.springframework.http.ResponseEntity.ok;

/**
 * Package com.example.test.controller
 * Module
 * Project test
 * Email 253498229@qq.com
 * Created on 2019-02-25 02:26
 *
 * @author wangbin
 */
@RestController
public class IndexController {
    @GetMapping("/")
    public ResponseEntity index() {
        Map<String, Object> result = new HashMap<>(1);
        result.put("data", "hello, world");
        return ok(result);
    }

}
